var yuan = {
    username: "yuan",
    age: 22,
    wx: "u82d1660a"
}

var jack = {
    username: "jack",
    age: 32,
    wx: "cx8b4ef1gn78er"
}

yuan = new Proxy(yuan, {
    get(target, p, receiver) {
        console.log(target, "查询了属性", p)
        // return window['username'];/// 这里如果这样写. 有递归风险的...
        // return Reflect.get(...arguments);
        return Reflect.get(target, p);
    },
    set(target, p, value, receiver) {
        console.log(target, "设置了属性", p, "值为：", value)
        Reflect.set(target, p, value);
    }
});

jack = new Proxy(yuan, {
    get(target, p, receiver) {
        console.log(target, "查询了属性", p)
        // return window['username'];/// 这里如果这样写. 有递归风险的...
        // return Reflect.get(...arguments);
        return Reflect.get(target, p);
    },
    set(target, p, value, receiver) {
        console.log(target, "设置了属性", p, "值为：", value)
        Reflect.set(target, p, value);
    }
});

yuan.username;
yuan.age;
yuan.username = "rain"
yuan.age = 18

console.log(jack.age)
console.log(jack.wx)
jack.wx="ojj9420tjboi";